import java.util.Objects;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User:恋恋
 * Date:2022-04-15
 * Time:23:04
 */
interface IShape{//定义接口
   void fun();
}
class Shape implements IShape{
    @Override
    public void fun() {
        System.out.println("hello");
    }
}
public class TestDeom {
    public static void main(String[] args) {
        //向上转型
        Object obj=new int[]{1,2,3,4,5,6};
        //向下转型，强行转发
        int[] add=(int[])obj;
        System.out.println("=======接收接口=========");
        //向上转型
        Object me=new Shape();
        //向下转型
        Shape we=(Shape)me;//强行转化为想转化的类型，类，接口


    }

}
